package com.itheima.converter;


import com.itheima.dto.CheckItemDTO;
import com.itheima.pojo.CheckItem;

public class CheckItemConverter {
    /**
     * CheckItemDto对象转CheckItem对象
     * @param
     * @return
     */
    public static CheckItem checkItemDTOtoCheckItem(CheckItemDTO checkItemDTO) {
        CheckItem result = new CheckItem();
        result.setId(checkItemDTO.getId());
        result.setCode(checkItemDTO.getCode());
        result.setName(checkItemDTO.getName());
        result.setSex(checkItemDTO.getSex());
        result.setAge(checkItemDTO.getAge());
        result.setPrice(checkItemDTO.getPrice().floatValue());
        result.setType(checkItemDTO.getType());
        result.setRemark(checkItemDTO.getRemark());
        result.setAttention(checkItemDTO.getAttention());
        return result;
    }

}
